import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

import '../constants.dart';

class TopBar extends StatelessWidget {
  const TopBar();
  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: padding10),
        child: Row(
          children: [
            Image.asset(
              "assets/wm_page_main_ic_location_black.webp",
              width: 28,
              height: 28,
            ),
            const Text(
              "潍坊.昌邑",
              style: TextStyle(
                  fontWeight: FontWeight.bold, fontSize: 16),
            ),
            Icon(
              Icons.arrow_forward_ios,
              size: 14,
            ),
            Spacer(),
            Stack(
              overflow: Overflow.visible,
              alignment: Alignment.topRight,
              children: [
                SvgPicture.asset("assets/notification.svg",
                    color: Colors.black),
                Positioned(
                  right: -6,
                  top: -4,
                  child: Container(
                      alignment: Alignment.center,
                      height: 14,
                      width: 14,
                      decoration: BoxDecoration(
                          color: Colors.red, shape: BoxShape.circle),
                      child: Text(
                        "5",
                        style: TextStyle(
                            color: Colors.white, fontSize: 10),
                      )),
                )
              ],
            )
          ],
        ),
      ),
    );
  }
}
